briyah 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +216 -0
- package/data/common/config/markup +1 -1
- package/data/packs/dnd5e/agents/player.json +11 -11
- package/data/packs/dnd5e/prompts/character_creator/defaults_config.json +21 -20
- package/data/packs/dnd5e/prompts/character_creator/perceive.prompt +19 -12
- package/data/packs/dnd5e/prompts/dnd_player/perceive.prompt +10 -6
- package/dist-sdk/server/src/app.service.d.ts +1 -0
- package/dist-sdk/server/src/app.service.js +26 -3
- package/dist-sdk/server/src/room/nickname.d.ts +1 -0
- package/dist-sdk/server/src/room/nickname.js +15 -0
- package/dist-sdk/server/src/room/room-store.service.d.ts +1 -0
- package/dist-sdk/server/src/room/room-store.service.js +4 -0
- package/dist-sdk/server/src/room/room.d.ts +28 -1
- package/dist-sdk/server/src/room/room.js +235 -12
- package/dist-sdk/server/src/rpg/rpg-roster.d.ts +1 -3
- package/dist-sdk/server/src/rpg/rpg-roster.js +12 -49
- package/dist-sdk/server/src/rpg/rpg.service.js +5 -5
- package/dist-sdk/server/src/sdk/index.d.ts +0 -1
- package/dist-sdk/server/src/sdk/index.js +1 -3
- package/dist-sdk/server/src/tools/core/index.d.ts +3 -0
- package/dist-sdk/server/src/tools/core/index.js +9 -0
- package/dist-sdk/server/src/tools/core/rename.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/core/rename.tool.js +61 -0
- package/dist-sdk/server/src/tools/native-tool.types.d.ts +10 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +9 -1
- package/dist-sdk/server/src/tools/packs/index.d.ts +3 -2
- package/dist-sdk/server/src/tools/packs/index.js +17 -9
- package/dist-sdk/shared/types/app.types.d.ts +0 -1
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Agent.html +73 -73
- package/docs/classes/Briyah.html +16 -16
- package/docs/classes/BriyahConfigService.html +7 -7
- package/docs/classes/NativeToolRegistry.html +10 -10
- package/docs/classes/PackInstantiationService.html +7 -7
- package/docs/classes/PackService.html +13 -13
- package/docs/classes/Room.html +190 -94
- package/docs/classes/RoomMessage.html +22 -22
- package/docs/enums/MessageAction.html +18 -18
- package/docs/functions/availableToolPacks.html +5 -5
- package/docs/functions/buildMarkdown.html +4 -4
- package/docs/functions/dnd5eTools.html +4 -4
- package/docs/functions/installToolPacks.html +8 -5
- package/docs/functions/pageMarker.html +4 -4
- package/docs/functions/registerToolPacks.html +4 -4
- package/docs/functions/splitMarkdownIntoPages.html +4 -4
- package/docs/functions/stripWrappingFence.html +4 -4
- package/docs/hierarchy.html +11 -11
- package/docs/index.html +4 -4
- package/docs/interfaces/AgentCreationOptions.html +12 -12
- package/docs/interfaces/AgentInfo.html +30 -30
- package/docs/interfaces/AgentMessagesResponse.html +8 -8
- package/docs/interfaces/AppService.html +140 -137
- package/docs/interfaces/Artifact.html +9 -9
- package/docs/interfaces/ArtifactMetadata.html +13 -13
- package/docs/interfaces/ArtifactWriteOptions.html +7 -7
- package/docs/interfaces/AttachDocumentResponse.html +6 -6
- package/docs/interfaces/BriyahConfigOptions.html +12 -12
- package/docs/interfaces/ChapterInfo.html +6 -6
- package/docs/interfaces/Character.html +10 -10
- package/docs/interfaces/ConversionAgent.html +6 -6
- package/docs/interfaces/CreateAgentResponse.html +5 -5
- package/docs/interfaces/CreateRoomResponse.html +6 -6
- package/docs/interfaces/CreateStoryResponse.html +5 -5
- package/docs/interfaces/FileList.html +5 -5
- package/docs/interfaces/FileMetadata.html +10 -10
- package/docs/interfaces/IConfigService.html +5 -5
- package/docs/interfaces/InstantiateModels.html +6 -6
- package/docs/interfaces/InstantiateRoomResult.html +7 -7
- package/docs/interfaces/LoadedPack.html +16 -16
- package/docs/interfaces/LoggingOptions.html +9 -9
- package/docs/interfaces/Message.html +9 -9
- package/docs/interfaces/ModelChoice.html +7 -7
- package/docs/interfaces/ModelInfo.html +8 -8
- package/docs/interfaces/NativeToolDefinition.html +10 -10
- package/docs/interfaces/PackAgentTemplate.html +9 -9
- package/docs/interfaces/PackRoomTemplate.html +11 -11
- package/docs/interfaces/PackView.html +20 -20
- package/docs/interfaces/PdfConversionOptions.html +10 -10
- package/docs/interfaces/PdfConversionResult.html +10 -10
- package/docs/interfaces/PdfMarkdownOptions.html +21 -21
- package/docs/interfaces/PdfMarkdownResult.html +11 -11
- package/docs/interfaces/PdfPageMarkdown.html +9 -9
- package/docs/interfaces/PreparedPromptResponse.html +6 -6
- package/docs/interfaces/ProcessTextResponse.html +10 -10
- package/docs/interfaces/PromptFile.html +7 -7
- package/docs/interfaces/PromptFileContent.html +8 -8
- package/docs/interfaces/PromptFilesResponse.html +5 -5
- package/docs/interfaces/PromptFolder.html +8 -8
- package/docs/interfaces/PromptFolderDefaults.html +19 -19
- package/docs/interfaces/PromptFolderDefaultsResponse.html +7 -7
- package/docs/interfaces/PromptFoldersResponse.html +5 -5
- package/docs/interfaces/RoomDetails.html +19 -19
- package/docs/interfaces/RoomErrorUpdate.html +8 -8
- package/docs/interfaces/RoomInfo.html +10 -10
- package/docs/interfaces/RoomMessageUpdate.html +13 -13
- package/docs/interfaces/RoomMessagesResponse.html +6 -6
- package/docs/interfaces/SendMessageResult.html +6 -6
- package/docs/interfaces/StoryErrorEvent.html +8 -8
- package/docs/interfaces/StoryIdea.html +8 -8
- package/docs/interfaces/StoryInfo.html +28 -28
- package/docs/interfaces/StoryIntroduceCharacterEvent.html +7 -7
- package/docs/interfaces/StoryProgressChapterEvent.html +6 -6
- package/docs/interfaces/StoryState.html +12 -12
- package/docs/interfaces/StoryStateEvent.html +7 -7
- package/docs/interfaces/ToolArtifact.html +9 -9
- package/docs/interfaces/ToolCaller.html +7 -7
- package/docs/interfaces/ToolDefinition.html +9 -9
- package/docs/interfaces/ToolHelpers.html +7 -7
- package/docs/interfaces/ToolPackDocuments.html +6 -6
- package/docs/interfaces/ToolParameter.html +8 -8
- package/docs/interfaces/ToolRoomAccess.html +49 -16
- package/docs/interfaces/ToolSummary.html +8 -8
- package/docs/interfaces/ToolsResponse.html +7 -7
- package/docs/interfaces/Transaction.html +13 -13
- package/docs/interfaces/TransactionHistoryResponse.html +6 -6
- package/docs/modules.html +6 -6
- package/docs/types/PackOrigin.html +4 -4
- package/docs/types/PromptScope.html +4 -4
- package/docs/types/RoomTurnMode.html +4 -4
- package/docs/types/RoomUpdate.html +4 -4
- package/docs/types/RosterOverrides.html +4 -4
- package/docs/types/ToolContext.html +4 -4
- package/docs/types/ToolRunResult.html +4 -4
- package/package.json +32 -3
- package/data/packs/acts/agents/character-guide.json +0 -6
- package/data/packs/acts/agents/discipleship-mentor.json +0 -6
- package/data/packs/acts/agents/mentor-coach.json +0 -6
- package/data/packs/acts/agents/student.json +0 -13
- package/data/packs/acts/agents/table-moderator.json +0 -6
- package/data/packs/acts/artifacts/chapter-01-acts-1.md +0 -405
- package/data/packs/acts/artifacts/chapter-02-acts-2.md +0 -443
- package/data/packs/acts/artifacts/chapter-03-acts-3.md +0 -409
- package/data/packs/acts/artifacts/chapter-04-acts-4.md +0 -438
- package/data/packs/acts/artifacts/chapter-05-acts-5.md +0 -434
- package/data/packs/acts/artifacts/chapter-06-acts-6.md +0 -441
- package/data/packs/acts/artifacts/chapter-07-acts-7.md +0 -472
- package/data/packs/acts/artifacts/chapter-08-acts-8.md +0 -512
- package/data/packs/acts/artifacts/chapter-09-acts-9.md +0 -346
- package/data/packs/acts/artifacts/chapter-10-acts-10.md +0 -367
- package/data/packs/acts/artifacts/chapter-11-acts-11.md +0 -391
- package/data/packs/acts/artifacts/chapter-12-acts-12.md +0 -390
- package/data/packs/acts/artifacts/chapter-13-acts-13.md +0 -388
- package/data/packs/acts/artifacts/chapter-14-acts-14.md +0 -466
- package/data/packs/acts/artifacts/chapter-15-acts-15.md +0 -413
- package/data/packs/acts/artifacts/chapter-16-acts-16.md +0 -585
- package/data/packs/acts/artifacts/chapter-17-acts-17.md +0 -428
- package/data/packs/acts/artifacts/chapter-18-acts-18.md +0 -486
- package/data/packs/acts/artifacts/chapter-19-acts-19.md +0 -461
- package/data/packs/acts/artifacts/chapter-20-acts-20.md +0 -389
- package/data/packs/acts/artifacts/chapter-21-acts-21.md +0 -452
- package/data/packs/acts/artifacts/chapter-22-acts-22.md +0 -424
- package/data/packs/acts/artifacts/chapter-23-acts-23.md +0 -395
- package/data/packs/acts/artifacts/chapter-24-acts-24.md +0 -446
- package/data/packs/acts/artifacts/chapter-25-acts-25.md +0 -391
- package/data/packs/acts/artifacts/chapter-26-acts-26.md +0 -431
- package/data/packs/acts/artifacts/chapter-27-acts-27.md +0 -530
- package/data/packs/acts/artifacts/chapter-28-acts-28.md +0 -1871
- package/data/packs/acts/artifacts/chapters.manifest.json +0 -170
- package/data/packs/acts/artifacts/character_guide-creation.md +0 -112
- package/data/packs/acts/artifacts/discipleship_mentor-procedure.md +0 -154
- package/data/packs/acts/artifacts/discipleship_mentor-systems.md +0 -72
- package/data/packs/acts/artifacts/manifest.json +0 -197
- package/data/packs/acts/artifacts/stage-guide.md +0 -94
- package/data/packs/acts/pack.json +0 -6
- package/data/packs/acts/prompts/acts_player/defaults_config.json +0 -5
- package/data/packs/acts/prompts/acts_player/perceive.json +0 -29
- package/data/packs/acts/prompts/acts_player/perceive.prompt +0 -87
- package/data/packs/acts/prompts/acts_player/system_instruction.prompt +0 -0
- package/data/packs/acts/prompts/acts_room_moderator/defaults_config.json +0 -9
- package/data/packs/acts/prompts/acts_room_moderator/moderate.json +0 -34
- package/data/packs/acts/prompts/acts_room_moderator/moderate.prompt +0 -70
- package/data/packs/acts/prompts/acts_room_moderator/system_instruction.prompt +0 -0
- package/data/packs/acts/prompts/character_guide/defaults_config.json +0 -18
- package/data/packs/acts/prompts/character_guide/perceive.json +0 -29
- package/data/packs/acts/prompts/character_guide/perceive.prompt +0 -140
- package/data/packs/acts/prompts/character_guide/system_instruction.prompt +0 -0
- package/data/packs/acts/prompts/discipleship_mentor/defaults_config.json +0 -23
- package/data/packs/acts/prompts/discipleship_mentor/perceive.json +0 -33
- package/data/packs/acts/prompts/discipleship_mentor/perceive.prompt +0 -245
- package/data/packs/acts/prompts/discipleship_mentor/system_instruction.prompt +0 -0
- package/data/packs/acts/prompts/mentor_coach/defaults_config.json +0 -13
- package/data/packs/acts/prompts/mentor_coach/perceive.json +0 -29
- package/data/packs/acts/prompts/mentor_coach/perceive.prompt +0 -87
- package/data/packs/acts/prompts/mentor_coach/system_instruction.prompt +0 -0
- package/data/packs/acts/rooms/session.json +0 -14
- package/data/packs/acts/rooms/training.json +0 -58
- package/dist-sdk/server/src/tools/packs/acts/data/cards.d.ts +0 -53
- package/dist-sdk/server/src/tools/packs/acts/data/cards.js +0 -54
- package/dist-sdk/server/src/tools/packs/acts/data/character-cards.generated.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/data/character-cards.generated.js +0 -185
- package/dist-sdk/server/src/tools/packs/acts/data/encounters.d.ts +0 -12
- package/dist-sdk/server/src/tools/packs/acts/data/encounters.js +0 -102
- package/dist-sdk/server/src/tools/packs/acts/data/event-cards.generated.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/data/event-cards.generated.js +0 -196
- package/dist-sdk/server/src/tools/packs/acts/data/item-cards.generated.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/data/item-cards.generated.js +0 -1311
- package/dist-sdk/server/src/tools/packs/acts/engine/cards.d.ts +0 -5
- package/dist-sdk/server/src/tools/packs/acts/engine/cards.js +0 -27
- package/dist-sdk/server/src/tools/packs/acts/engine/challenge.d.ts +0 -37
- package/dist-sdk/server/src/tools/packs/acts/engine/challenge.js +0 -120
- package/dist-sdk/server/src/tools/packs/acts/engine/dice.d.ts +0 -20
- package/dist-sdk/server/src/tools/packs/acts/engine/dice.js +0 -41
- package/dist-sdk/server/src/tools/packs/acts/engine/sheet.d.ts +0 -54
- package/dist-sdk/server/src/tools/packs/acts/engine/sheet.js +0 -200
- package/dist-sdk/server/src/tools/packs/acts/index.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/index.js +0 -24
- package/dist-sdk/server/src/tools/packs/acts/tools/award.tool.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/tools/award.tool.js +0 -184
- package/dist-sdk/server/src/tools/packs/acts/tools/challenge.tool.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/tools/challenge.tool.js +0 -107
- package/dist-sdk/server/src/tools/packs/acts/tools/chapter.tool.d.ts +0 -3
- package/dist-sdk/server/src/tools/packs/acts/tools/chapter.tool.js +0 -146
- package/dist-sdk/server/src/tools/packs/acts/tools/check.tool.d.ts +0 -4
- package/dist-sdk/server/src/tools/packs/acts/tools/check.tool.js +0 -241
- package/dist-sdk/server/src/tools/packs/acts/tools/encounter.tool.d.ts +0 -3
- package/dist-sdk/server/src/tools/packs/acts/tools/encounter.tool.js +0 -72
- package/dist-sdk/server/src/tools/packs/acts/tools/faith.tool.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/tools/faith.tool.js +0 -75
- package/dist-sdk/server/src/tools/packs/acts/tools/shared.d.ts +0 -20
- package/dist-sdk/server/src/tools/packs/acts/tools/shared.js +0 -70
- package/dist-sdk/server/src/tools/packs/acts/tools/sheet.tools.d.ts +0 -4
- package/dist-sdk/server/src/tools/packs/acts/tools/sheet.tools.js +0 -215
- package/docs/functions/actsTools.html +0 -44
package/LICENSE
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
203
|
+
|
|
204
|
+
Copyright 2026 Wilhite Software Consulting, LLC
|
|
205
|
+
|
|
206
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
207
|
+
you may not use this file except in compliance with the License.
|
|
208
|
+
You may obtain a copy of the License at
|
|
209
|
+
|
|
210
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
211
|
+
|
|
212
|
+
Unless required by applicable law or agreed to in writing, software
|
|
213
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
214
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
215
|
+
See the License for the specific language governing permissions and
|
|
216
|
+
limitations under the License.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
23.
|
|
1
|
+
23.459793440000034
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
"key": "player",
|
|
3
|
+
"promptFolder": "dnd_player",
|
|
4
|
+
"label": "Player (human)",
|
|
5
|
+
"modelRole": "economy",
|
|
6
|
+
"overrides": {
|
|
7
|
+
"agentName": "Player One",
|
|
8
|
+
"agentNickname": "PlayerOne",
|
|
9
|
+
"description": "A player at the table. Renamed to their character once their sheet is built.",
|
|
10
|
+
"controlledByHuman": true,
|
|
11
|
+
"useModerator": true
|
|
12
|
+
}
|
|
13
13
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"agentName": "Character Creator",
|
|
3
|
-
"agentNickname": "Creator",
|
|
4
|
-
"description": "Builds character sheets and applies every level-up. The Dungeon Master hands them one player at a time.",
|
|
5
|
-
"toolNames": [
|
|
6
|
-
"class_guide",
|
|
7
|
-
"create_sheet",
|
|
8
|
-
"read_sheet",
|
|
9
|
-
"patch_sheet",
|
|
10
|
-
"level_up",
|
|
11
|
-
"roll_dice",
|
|
12
|
-
"rules_lookup",
|
|
13
|
-
"spell"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
1
|
+
{
|
|
2
|
+
"agentName": "Character Creator",
|
|
3
|
+
"agentNickname": "Creator",
|
|
4
|
+
"description": "Builds character sheets and applies every level-up. The Dungeon Master hands them one player at a time.",
|
|
5
|
+
"toolNames": [
|
|
6
|
+
"class_guide",
|
|
7
|
+
"create_sheet",
|
|
8
|
+
"read_sheet",
|
|
9
|
+
"patch_sheet",
|
|
10
|
+
"level_up",
|
|
11
|
+
"roll_dice",
|
|
12
|
+
"rules_lookup",
|
|
13
|
+
"spell",
|
|
14
|
+
"rename_agent"
|
|
15
|
+
],
|
|
16
|
+
"documentIds": [
|
|
17
|
+
"pack:dnd5e.character_creator-basics"
|
|
18
|
+
],
|
|
19
|
+
"promptCacheTTL": 60,
|
|
20
|
+
"maxHistoryMessages": 60
|
|
21
|
+
}
|
|
@@ -327,25 +327,32 @@ instruments a bard chooses.
|
|
|
327
327
|
8. **Spells and cantrips, for every caster** — see below. Skip only when the class guide
|
|
328
328
|
says the class casts nothing at this level.
|
|
329
329
|
9. **Starting equipment**.
|
|
330
|
-
10. **
|
|
330
|
+
10. **A name, appearance, one bond, one flaw**. The name matters mechanically as well as for
|
|
331
|
+
flavour — see below.
|
|
331
332
|
11. **Read back** the finished character in a few lines and ask them to confirm.
|
|
332
333
|
12. Build the sheet, then hand back to **{{roomLeader}}**.
|
|
333
334
|
|
|
334
335
|
You may collapse steps for an AI player. Never collapse them for a human without asking.
|
|
335
336
|
|
|
336
|
-
###
|
|
337
|
-
**REQUIRED**:
|
|
338
|
-
|
|
339
|
-
|
|
337
|
+
### Ask what the character is called
|
|
338
|
+
**REQUIRED**: Ask the player what their character's name is, and pass it as `create_sheet`'s
|
|
339
|
+
`character`. Pass the name the room currently knows them by — the placeholder they were seated
|
|
340
|
+
with, like `Player` or `PlayerOne` — as `owner`.
|
|
340
341
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
goes nowhere useful. A campaign lost about a quarter of its calls to exactly that.
|
|
342
|
+
**`create_sheet` then renames them to their character**, so from that moment the table has
|
|
343
|
+
exactly one name for each player and it is the one the room routes by. Say so in a clause as you
|
|
344
|
+
finish: *"The table will call you Thorin from here."*
|
|
345
345
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
346
|
+
The routing name is the **first word**, so "Thorin Oakenshield" is addressed as "Thorin". Tell a
|
|
347
|
+
player who picks a long name which part everyone will actually use.
|
|
348
|
+
|
|
349
|
+
If a player has no idea, offer two or three that suit the concept and let them pick, or take the
|
|
350
|
+
placeholder — a character may keep it, and nothing breaks.
|
|
351
|
+
|
|
352
|
+
**A name that clashes is refused, and the sheet is still built.** If two characters would both
|
|
353
|
+
answer to "Thorin", or a name matches one of the crew, `create_sheet` reports it and the player
|
|
354
|
+
keeps their placeholder. Ask for a different name and rename them with `rename_agent`; do not
|
|
355
|
+
rebuild the character.
|
|
349
356
|
|
|
350
357
|
### Spells and cantrips
|
|
351
358
|
- **REQUIRED**: A class with spell slots and no spells cannot play. If `create_sheet` reports
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
- **Your Character**: {{agentNickname}}
|
|
5
5
|
- **How others see you**: {{agentDescription}}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
**{{agentNickname}}** is the name this table addresses you by, and the only one it routes to. If
|
|
8
|
+
it still reads like a placeholder — `Player`, `PlayerOne` — you have not been through character
|
|
9
|
+
creation yet; you will be renamed to your character as soon as your sheet is built. Once that has
|
|
10
|
+
happened, this *is* your character's name, and nobody here will call you anything else.
|
|
9
11
|
|
|
10
12
|
You play exactly one character at this table: yourself. You are a player, not the
|
|
11
13
|
storyteller.
|
|
@@ -149,10 +151,12 @@ than the Dungeon Master. When that happens:
|
|
|
149
151
|
- If they ask for your whole concept at once, give it all in one reply — race, class,
|
|
150
152
|
background, which abilities matter most, one thing you care about, one flaw, and a sentence
|
|
151
153
|
of backstory. Do not make them ask eight times.
|
|
152
|
-
- **
|
|
153
|
-
|
|
154
|
-
uses
|
|
155
|
-
|
|
154
|
+
- **Name your character when the creator asks.** Pick something you would like to be called for
|
|
155
|
+
the rest of the campaign; the table is renamed to it, so it becomes the one name everyone here
|
|
156
|
+
uses. The **first word** is what people actually say, so "Thorin Oakenshield" is addressed as
|
|
157
|
+
"Thorin".
|
|
158
|
+
- **REQUIRED**: Once your name is set, do not introduce a second one. A character who signs off
|
|
159
|
+
under a name the room has never heard of gets called by it, and that turn goes to nobody.
|
|
156
160
|
- Do not compute anything. Hit points, armour class and modifiers are theirs to work out.
|
|
157
161
|
- Do not ask the Dungeon Master about character creation. They do not hold those rules.
|
|
158
162
|
|
|
@@ -177,6 +177,7 @@ export declare class AppService {
|
|
|
177
177
|
createPromptFolder(folderName: string): void;
|
|
178
178
|
deletePromptFolder(folderName: string): void;
|
|
179
179
|
updateAgent(agentId: string, updates: UpdateAgentRequest): Promise<void>;
|
|
180
|
+
private renameAgentEverywhere;
|
|
180
181
|
get userAuthoredToolsEnabled(): boolean;
|
|
181
182
|
listTools(): Promise<ToolDefinition[]>;
|
|
182
183
|
private preserveHiddenGrants;
|
|
@@ -39,6 +39,7 @@ const fs = __importStar(require("fs"));
|
|
|
39
39
|
const path = __importStar(require("path"));
|
|
40
40
|
const room_store_service_1 = require("./room/room-store.service");
|
|
41
41
|
const prompt_resolver_1 = require("./config/prompt-resolver");
|
|
42
|
+
const core_1 = require("./tools/core");
|
|
42
43
|
const app_types_1 = require("../../shared/types/app.types");
|
|
43
44
|
const pdf_lib_1 = require("pdf-lib");
|
|
44
45
|
const pdf_conversion_1 = require("./documents/pdf-conversion");
|
|
@@ -1156,8 +1157,9 @@ class AppService {
|
|
|
1156
1157
|
`"${room.getName()}" needs one. ${reason}`);
|
|
1157
1158
|
}
|
|
1158
1159
|
}
|
|
1159
|
-
if (updates.agentNickname !== undefined)
|
|
1160
|
-
agent
|
|
1160
|
+
if (updates.agentNickname !== undefined) {
|
|
1161
|
+
await this.renameAgentEverywhere(agent, updates.agentNickname);
|
|
1162
|
+
}
|
|
1161
1163
|
if (updates.description !== undefined)
|
|
1162
1164
|
agent.description = updates.description;
|
|
1163
1165
|
if (updates.modelName !== undefined)
|
|
@@ -1189,6 +1191,27 @@ class AppService {
|
|
|
1189
1191
|
agent.smallModelName = updates.smallModelName || undefined;
|
|
1190
1192
|
agent.save();
|
|
1191
1193
|
}
|
|
1194
|
+
async renameAgentEverywhere(agent, newName) {
|
|
1195
|
+
const previous = agent.agentNickname;
|
|
1196
|
+
const trimmed = (newName || '').trim();
|
|
1197
|
+
if (!trimmed || trimmed === previous) {
|
|
1198
|
+
if (trimmed)
|
|
1199
|
+
agent.agentNickname = trimmed;
|
|
1200
|
+
return;
|
|
1201
|
+
}
|
|
1202
|
+
const rooms = (await this.roomStore.getAllRooms()).filter((room) => room.getAgents().some((a) => a.id === agent.id));
|
|
1203
|
+
for (const room of rooms) {
|
|
1204
|
+
const clash = room.conflictingNickname(agent, trimmed);
|
|
1205
|
+
if (clash) {
|
|
1206
|
+
throw new errors_1.ValidationError(`"${trimmed}" would be confused with "${clash}" in room "${room.getName()}". ` +
|
|
1207
|
+
'Two agents in a room must not share a name, or a first word — the room routes by name and could not tell them apart.');
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
agent.agentNickname = trimmed;
|
|
1211
|
+
for (const room of rooms) {
|
|
1212
|
+
room.repointNickname(previous, trimmed);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1192
1215
|
get userAuthoredToolsEnabled() {
|
|
1193
1216
|
return this.toolExecution.userAuthoredToolsEnabled;
|
|
1194
1217
|
}
|
|
@@ -1206,7 +1229,7 @@ class AppService {
|
|
|
1206
1229
|
const enabled = new Set(this.enabledPacks());
|
|
1207
1230
|
return this.toolExecution
|
|
1208
1231
|
.listNativeTools()
|
|
1209
|
-
.filter((t) => !t.group || enabled.has(t.group))
|
|
1232
|
+
.filter((t) => !t.group || t.group === core_1.CORE_TOOL_GROUP || enabled.has(t.group))
|
|
1210
1233
|
.map((t) => ({
|
|
1211
1234
|
name: t.name,
|
|
1212
1235
|
description: t.description,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function nicknamesAreAmbiguous(a: string, b: string): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.nicknamesAreAmbiguous = nicknamesAreAmbiguous;
|
|
4
|
+
function nicknamesAreAmbiguous(a, b) {
|
|
5
|
+
const keys = (name) => {
|
|
6
|
+
const trimmed = (name || '').trim();
|
|
7
|
+
return new Set([trimmed.toLowerCase(), trimmed.split(/\s+/)[0].toLowerCase()]);
|
|
8
|
+
};
|
|
9
|
+
const left = keys(a);
|
|
10
|
+
for (const key of keys(b)) {
|
|
11
|
+
if (left.has(key))
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
@@ -32,6 +32,7 @@ export declare class RoomStoreService {
|
|
|
32
32
|
static applyRoomSettings(room: Room, settings: RoomSettingsSnapshot): void;
|
|
33
33
|
static resolveLeaderNickname(room: Room, stored: string | undefined): string;
|
|
34
34
|
getPublishedInstances(templateId: string): Promise<Room[]>;
|
|
35
|
+
getAllRooms(): Promise<Room[]>;
|
|
35
36
|
getAllPublishedInstances(): Promise<Room[]>;
|
|
36
37
|
private ensureLoaded;
|
|
37
38
|
getTemplateRooms(): Promise<RoomInfo[]>;
|
|
@@ -198,6 +198,10 @@ let RoomStoreService = RoomStoreService_1 = class RoomStoreService {
|
|
|
198
198
|
}
|
|
199
199
|
return instances;
|
|
200
200
|
}
|
|
201
|
+
async getAllRooms() {
|
|
202
|
+
await this.ensureLoaded();
|
|
203
|
+
return [...this.rooms.values()];
|
|
204
|
+
}
|
|
201
205
|
async getAllPublishedInstances() {
|
|
202
206
|
await this.ensureLoaded();
|
|
203
207
|
return [...this.rooms.values()].filter((room) => !!room.getTemplateRoomId());
|
|
@@ -4,10 +4,23 @@ import { RoomMessage } from './message';
|
|
|
4
4
|
import { Artifact } from './artifact';
|
|
5
5
|
import { ToolStoreService } from '../tools/tool-store.service';
|
|
6
6
|
import { ToolExecutionService } from '../tools/tool-execution.service';
|
|
7
|
+
export interface RenameResult {
|
|
8
|
+
renamed: boolean;
|
|
9
|
+
from?: string;
|
|
10
|
+
to?: string;
|
|
11
|
+
fullName?: string;
|
|
12
|
+
reason?: 'not_found' | 'ambiguous' | 'invalid' | 'unchanged';
|
|
13
|
+
conflictsWith?: string;
|
|
14
|
+
artifactsUpdated?: number;
|
|
15
|
+
}
|
|
7
16
|
export declare class Room {
|
|
8
17
|
private static maxToolIterations;
|
|
9
18
|
private static readonly CONTINUE_NOTE;
|
|
10
19
|
private static maxSelfContinues;
|
|
20
|
+
private static maxStallRecoveries;
|
|
21
|
+
private static rerouteNote;
|
|
22
|
+
private static rerouteHandoffNote;
|
|
23
|
+
private static retryHandoffNote;
|
|
11
24
|
private id;
|
|
12
25
|
private name;
|
|
13
26
|
private goal;
|
|
@@ -28,6 +41,8 @@ export declare class Room {
|
|
|
28
41
|
private currentSpeaker;
|
|
29
42
|
private selfContinuingAgent;
|
|
30
43
|
private consecutiveSelfContinues;
|
|
44
|
+
private lastDispatch;
|
|
45
|
+
private stallRecoveries;
|
|
31
46
|
private isPublished;
|
|
32
47
|
private isLoading;
|
|
33
48
|
private onStateChangeCallbacks;
|
|
@@ -79,6 +94,11 @@ export declare class Room {
|
|
|
79
94
|
setCurrentSpeaker(agentNickname: string | null): void;
|
|
80
95
|
isAgentsTurn(agentNickname: string): boolean;
|
|
81
96
|
private endTurn;
|
|
97
|
+
private recoverStalledFloor;
|
|
98
|
+
private configuredModerator;
|
|
99
|
+
private rerouteStalledTurn;
|
|
100
|
+
private resolveRerouteResponder;
|
|
101
|
+
private queueAgentResponse;
|
|
82
102
|
getRoomMessageStats(): {
|
|
83
103
|
numMessages: number;
|
|
84
104
|
numChars: number;
|
|
@@ -92,6 +112,11 @@ export declare class Room {
|
|
|
92
112
|
getCreatedAt(): Date;
|
|
93
113
|
setCreatedAt(date: Date): void;
|
|
94
114
|
getArtifacts(): Artifact[];
|
|
115
|
+
renameAgent(from: string, to: string): RenameResult;
|
|
116
|
+
conflictingNickname(agent: Agent, nickname: string): string | undefined;
|
|
117
|
+
repointNickname(previous: string, nickname: string): number;
|
|
118
|
+
private renameInArtifacts;
|
|
119
|
+
private announceRename;
|
|
95
120
|
isRoomAdjourned(): boolean;
|
|
96
121
|
setArtifacts(artifacts: Artifact[]): void;
|
|
97
122
|
private namesNobodyInADirectedRoom;
|
|
@@ -122,7 +147,9 @@ export declare class Room {
|
|
|
122
147
|
perceive(agent: Agent, message: RoomMessage, onResponse: (message: RoomMessage | null) => void, opts?: {
|
|
123
148
|
continuing?: boolean;
|
|
124
149
|
}): void;
|
|
125
|
-
moderate(moderatorAgent: Agent, message: RoomMessage, onResponse: (message: RoomMessage | null) => void
|
|
150
|
+
moderate(moderatorAgent: Agent, message: RoomMessage, onResponse: (message: RoomMessage | null) => void, opts?: {
|
|
151
|
+
note?: string;
|
|
152
|
+
}): Promise<void>;
|
|
126
153
|
private handleInsufficientBalance;
|
|
127
154
|
findArtifact(name: string): Artifact | undefined;
|
|
128
155
|
publishArtifact(name: string, creator: string, body: string, viewers?: string[], transient?: boolean): Artifact | null;
|